pipeline {
    agent any
    options { timestamps () }
    parameters {
        choice(name: 'TARGET', choices: ['ALL', 'YC', 'PC', 'PM', 'TW'], description: '目标算法')
        string(name: 'DOCKER_COMPOSE_FILE', defaultValue: 'D:\\server\\kclk\\docker-compose.yml', description: 'Docker Compose 配置文件地址?')
    }
    stages {
        stage('Deploy') {
            steps {
                bat (
                    label: 'Copy docker-compose.yml',
                    script: "copy ${params.DOCKER_COMPOSE_FILE} ."
                )
                bat(
                        label: 'Deploy docker-compose',
                        script: 'docker-compose up -d --build'
                )
            }
        }
    }
}